package com.xc.ezplan.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.xc.ezplan.core.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @author lixingchen
 * @date 2022/11/15
 * @description 后台菜单表
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value ="admin_menu")
@Data
@ApiModel(description = "菜单实体")
public class AdminMenu extends BaseEntity {
    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "菜单ID")
    private Long id;

    /**
     * 上级菜单ID
     */
    @ApiModelProperty(value = "上级菜单ID")
    private Long pid;

    /**
     * 菜单标题
     */
    @ApiModelProperty(value = "菜单标题")
    private String title;

    /**
     * 组件名称
     */
    @ApiModelProperty(value = "组件名称")
    private String name;

    /**
     * 组件
     */
    @ApiModelProperty(value = "组件")
    private String component;

    /**
     * icon
     */
    @ApiModelProperty(value = "icon")
    private String icon;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer menuSort;

    /**
     * 链接地址
     */
    @ApiModelProperty(value = "链接地址")
    private String path;

    /**
     * 是否外链
     */
    @ApiModelProperty(value = "是否外链")
    private Boolean iFrame;

    /**
     * 隐藏
     */
    @ApiModelProperty(value = "隐藏")
    private Boolean hidden;

    /**
     * 权限
     */
    @ApiModelProperty(value = "权限")
    private String permission;

    @TableField(exist = false)
    private List<AdminMenu> children;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}